/**
 * @author light_dust_generator
 * @since 2021-08-23 14:21:49
 */
 <template>
   <qc-page-header @back="goBack"></qc-page-header>
   <a-card :bordered="false" :title="t('org.notice.noticeCardTitle')">
     <template #extra>
       <qc-save-button @click="save"></qc-save-button>
     </template>
     <notice-form ref="noticeFormRef" :noticeId="noticeId"></notice-form>
   </a-card>
 </template>
 <script lang='ts'>
 import { computed, defineComponent, reactive, ref, toRefs } from "vue";
 import { useRouter } from "vue-router";
 import { useI18n } from "vue-i18n";
 import { noticeIndexPageUrl } from "./interface";
 import NoticeForm from "./component/notice-form.vue";
 export default defineComponent({
   components: {NoticeForm},
   setup() {
     const { t } = useI18n();
     const noticeFormRef = ref();
     const router = useRouter();
     const formState = reactive({
       noticeId: router.currentRoute.value.params.id,
       save: () => noticeFormRef.value.onSubmit(),
       goBack: () => router.push({ path: noticeIndexPageUrl }),
     });
     return {
       t,
       noticeFormRef,
       ...toRefs(formState),
     };
   },
 });
 </script>